﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MoveComponent : MonoBehaviour
{
    private CharacterController m_controller;

    private Vector3 m_moveVector3;

    // Use this for initialization
    void Start()
    {
        m_controller = GetComponent<CharacterController>();
        if (null == m_controller)
        {
            Debug.Log("Missing ChracterController");
        }
    }

    // Update is called once per frame
    void Update()
    {
        if (null != m_controller)
        {
            m_controller.SimpleMove(m_moveVector3);
        }
    }

    public void Move(Vector3 moveVector3)
    {
        m_moveVector3.Set(moveVector3.x, moveVector3.y, moveVector3.z);
    }
}
